]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Use the correct schema for 'dynamic-workspaces'
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 6 Jun 2013 16:47:56 +0000 (18:47 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 7 Jun 2013 17:52:10 +0000 (19:52 +0200)
We currently monitor the shell's override schema for changes to
the 'dynamic-workspaces' key, which ends up being the wrong
schema in classic mode. With the new ability to use mode-specific
overides, we can finally fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=701717

js/ui/main.js
js/ui/windowManager.js

index aec10d1e1d91d23e781a23f1bb477b0f4763a97d..0774b3aad20dc8f239126a44b2dd39e6e370a7d5 100644 (file)
@@ -71,6 +71,7 @@ let _startDate;
 let _defaultCssStylesheet = null;
 let _cssStylesheet = null;
 let _a11ySettings = null;
+let dynamicWorkspacesSchema = null;
 
 function _sessionUpdated() {
     _loadDefaultStylesheet();
@@ -121,6 +122,11 @@ function _initializePrefs() {
     let keys = new Gio.Settings({ schema: sessionMode.overridesSchema }).list_keys();
     for (let i = 0; i < keys.length; i++)
         Meta.prefs_override_preference_schema(keys[i], sessionMode.overridesSchema);
+
+    if (keys.indexOf('dynamic-workspaces') > -1)
+        dynamicWorkspacesSchema = sessionMode.overridesSchema;
+    else
+        dynamicWorkspacesSchema = 'org.gnome.mutter';
 }
 
 function _initializeUI() {
index 5f96a5fcc91f79f2b73458350978bb1a92968a08..89ccf694ec319ba1779478c5a300113efb9786d8 100644 (file)
@@ -93,8 +93,8 @@ const WorkspaceTracker = new Lang.Class({
         global.screen.connect('window-left-monitor', Lang.bind(this, this._windowLeftMonitor));
         global.screen.connect('restacked', Lang.bind(this, this._windowsRestacked));
 
-        this._overrideSettings = new Gio.Settings({ schema: 'org.gnome.shell.overrides' });
-        this._overrideSettings.connect('changed::dynamic-workspaces', Lang.bind(this, this._queueCheckWorkspaces));
+        this._workspaceSettings = new Gio.Settings({ schema: Main.dynamicWorkspacesSchema });
+        this._workspaceSettings.connect('changed::dynamic-workspaces', Lang.bind(this, this._queueCheckWorkspaces));
 
         this._nWorkspacesChanged();
     },